package com.Jeu;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Menu extends Activity {

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Button ResumeButton = (Button) findViewById(R.id.Resume);
		ResumeButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent ResumeIntent = new Intent(Menu.this, Resume.class);
				startActivity(ResumeIntent);
			}
		});

		Button NewGameButton = (Button) findViewById(R.id.NewGame);
		NewGameButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent NewGameIntent = new Intent(Menu.this, NewGame.class);
				startActivity(NewGameIntent);
			}
		});

		Button ModeGameButton = (Button) findViewById(R.id.ModeGame);
		ModeGameButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent ModeIntent = new Intent(Menu.this, ModeGame.class);
				startActivity(ModeIntent);
			}
		});

		Button OptionsButton = (Button) findViewById(R.id.Options);
		OptionsButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent OptionsIntent = new Intent(Menu.this, Options.class);
				startActivity(OptionsIntent);
			}
		});

		Button HighScoreButton = (Button) findViewById(R.id.HighScore);
		HighScoreButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent HighScoreIntent = new Intent(Menu.this, HighScore.class);
				startActivity(HighScoreIntent);
			}
		});

		Button QuitButton = (Button) findViewById(R.id.Quit);
		QuitButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent intent = new Intent(Intent.ACTION_MAIN);
				intent.addCategory(Intent.CATEGORY_HOME);
				intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				startActivity(intent);
			}
		});

	}
}